<?php
define('ElvesCMSAdmin','1');
define('ElvesCMSAPage','login');
define('ElvesCMSNFPage','1');
require("../class/connect.php");
require("../class/functions.php");
//风格
$loginadminstyleid=ElveReturnAdminStyle();
//变量处理
$elvescmskey1='';
$elvescmskey2='';
$elvescmskey3='';
$elvescmskey4='';
$elvescmskey5='';
if($_POST['elvescmskey1']&&$_POST['elvescmskey2']&&$_POST['elvescmskey3']&&$_POST['elvescmskey4']&&$_POST['elvescmskey5'])
{
  $elvescmskey1=RepPostVar($_POST['elvescmskey1']);
  $elvescmskey2=RepPostVar($_POST['elvescmskey2']);
  $elvescmskey3=RepPostVar($_POST['elvescmskey3']);
  $elvescmskey4=RepPostVar($_POST['elvescmskey4']);
  $elvescmskey5=RepPostVar($_POST['elvescmskey5']);
  $ecertkeyrndstr=$elvescmskey1.'#!#'.$elvescmskey2.'#!#'.$elvescmskey3.'#!#'.$elvescmskey4.'#!#'.$elvescmskey5;
  esetcookie('ecertkeyrnds',$ecertkeyrndstr,0);
}
elseif(getcvar('ecertkeyrnds'))
{
  $certr=explode('#!#',getcvar('ecertkeyrnds'));
  $elvescmskey1=RepPostVar($certr[0]);
  $elvescmskey2=RepPostVar($certr[1]);
  $elvescmskey3=RepPostVar($certr[2]);
  $elvescmskey4=RepPostVar($certr[3]);
  $elvescmskey5=RepPostVar($certr[4]);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Elves网站管理系统</title>

<base onmouseover="window.status='Elves网站管理系统(ElvesCMS) ';return true">
<script>
if(self!=top)
{
  parent.location.href='index.php';
}
function CheckLogin(obj){
  if(obj.username.value=='')
  {
    alert('请输入用户名');
    obj.username.focus();
    return false;
  }
  if(obj.password.value=='')
  {
    alert('请输入登录密码');
    obj.password.focus();
    return false;
  }
  if(obj.loginauth!=null)
  {
    if(obj.loginauth.value=='')
    {
      alert('请输入认证码');
      obj.loginauth.focus();
      return false;
    }
  }
  if(obj.key!=null)
  {
    if(obj.key.value=='')
    {
      alert('请输入验证码');
      obj.key.focus();
      return false;
    }
  }
  return true;
}
</script>
    <style>
        *{padding: 0;margin: 0;}
        body{font-family: '微软雅黑';background-color: #6699cc;}
        h1{font-size: 16px;color: #666;border-left: 5px solid #ffcc00;padding-left: 10px;display: block;position: relative;padding:10px;}
        #time{font-size: 12px;color: #aaa;}
        h1 em{font-size: 14px;padding: 0px;color: #999;font-style: normal;}
        .ctable{border-top: 1px solid #eee;padding-left: 10px;padding-right: 10px;padding-top: 10px;}
        .ctable td{color: #666;font-size: 14px;padding: 3px;padding: 10px;border-bottom: 1px dotted #eee;}
        .ctable td input,.ctable td select{border: 1px solid #ccc;line-height: 30px;height: 30px;width: 90%;}
        button{height: 40px;padding-left: 110px;padding-right: 110px;border: 1px solid #fff;color: #fff;font-size: 14px;cursor: pointer;
            background: #6699cc; /* Old browsers */
            *padding-left: 80px;*padding-right: 80px;
        }
        button:hover{border: 1px solid #4275a7;}
        .maint{position: absolute;top: 20%;z-index: 2;left: 50%;margin-left: -205px;background-color: #fff;border-radius: 5px}
        .bg-bubbles {padding: 0;margin: 0; position: absolute; top: 0; left: 0; width: 100%;overflow: hidden; height: 100%; z-index: 1; } .bg-bubbles li {position: absolute; list-style: none; display: block; width: 40px; height: 40px; background-color: rgba(255, 255, 255, 0.15); bottom: -200px; -webkit-animation: square 25s infinite; animation: square 25s infinite; -webkit-transition-timing-function: linear; transition-timing-function: linear; } .bg-bubbles li:nth-child(1) {left: 10%; } .bg-bubbles li:nth-child(2) {left: 20%; width: 80px; height: 80px; -webkit-animation-delay: 2s; animation-delay: 2s; -webkit-animation-duration: 17s; animation-duration: 17s; } .bg-bubbles li:nth-child(3) {left: 25%; -webkit-animation-delay: 4s; animation-delay: 4s; } .bg-bubbles li:nth-child(4) {left: 40%; width: 60px; height: 60px; -webkit-animation-duration: 22s; animation-duration: 22s; background-color: rgba(255, 255, 255, 0.25); } .bg-bubbles li:nth-child(5) {left: 70%; } .bg-bubbles li:nth-child(6) {left: 80%; width: 120px; height: 120px; -webkit-animation-delay: 3s; animation-delay: 3s; background-color: rgba(255, 255, 255, 0.2); } .bg-bubbles li:nth-child(7) {left: 32%; width: 160px; height: 160px; -webkit-animation-delay: 7s; animation-delay: 7s; } .bg-bubbles li:nth-child(8) {left: 55%; width: 20px; height: 20px; -webkit-animation-delay: 15s; animation-delay: 15s; -webkit-animation-duration: 40s; animation-duration: 40s; } .bg-bubbles li:nth-child(9) {left: 25%; width: 10px; height: 10px; -webkit-animation-delay: 2s; animation-delay: 2s; -webkit-animation-duration: 40s; animation-duration: 40s; background-color: rgba(255, 255, 255, 0.3); } .bg-bubbles li:nth-child(10) {left: 90%; width: 160px; height: 160px; -webkit-animation-delay: 11s; animation-delay: 11s; } @-webkit-keyframes square {0% {-webkit-transform: translateY(0); transform: translateY(0); } 100% {-webkit-transform: translateY(-1100px) rotate(600deg); transform: translateY(-1100px) rotate(600deg); } } @keyframes square {0% {-webkit-transform: translateY(0); transform: translateY(0); } 100% {-webkit-transform: translateY(-1100px) rotate(600deg); transform: translateY(-1100px) rotate(600deg); } }
    </style>
</head>

<body text="383636"  onload="document.login.username.focus();">
<ul class="bg-bubbles"><li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li></ul>
<table  class="maint" width="410" border="0"  cellspacing="0" cellpadding="0" align="center">
  <form name="login" id="login" method="post" action="elveadmin.php" onsubmit="return CheckLogin(document.login);">
    <input type="hidden" name="melve" value="login">

    <tr> 
      <td height="256">
<h1>管理系统  <em>LOGIN</em> <div id="time"></div></h1>  <script>
document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());
setInterval("document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);
</script>
       <table  class="ctable" width="100%"  border="0" align="right" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="60" height="27"><div style="width:60px">用户名: </div></td>
            <td colspan="2"> <input name="username" type="text" class="b-form2" size="38"> 
            </td>
          </tr>
          <tr> 
            <td height="27">密&nbsp;&nbsp;码:&nbsp;</td>
            <td colspan="2"> <input name="password" type="password" class="b-form2" size="38"> 
            </td>
          </tr>
      <?php
      if($elve_config['esafe']['loginauth'])
      {
      ?>
          <tr> 
            <td height="27">认证码:&nbsp;</td>
            <td colspan="2"><input name="loginauth" type="password" id="loginauth" class="b-form2" size="38"></td>
          </tr>
          <?php
      }
      ?>
          <tr>
            <td height="27">提&nbsp;&nbsp;问:&nbsp;</td>
            <td colspan="2"><select name="equestion" id="equestion"onchange="if(this.options[this.selectedIndex].value==0){showanswer.style.display='none';}else{showanswer.style.display='';}">
                <option value="0">无安全提问</option>
                <option value="1">母亲的名字</option>
                <option value="2">爷爷的名字</option>
                <option value="3">父亲出生的城市</option>
                <option value="4">您其中一位老师的名字</option>
                <option value="5">您个人计算机的型号</option>
                <option value="6">您最喜欢的餐馆名称</option>
                <option value="7">驾驶执照的最后四位数字</option>
              </select></td>
          </tr>
          <tr id="showanswer">
            <td height="27">答&nbsp;&nbsp;案:&nbsp;</td>
            <td colspan="2"><input name="eanswer" type="text" id="eanswer" class="b-form2" size="38"></td>
          </tr>
          <?php
      if(empty($public_r['adminloginkey']))
      {
      ?>
          <tr> 
            <td height="27">验证码:&nbsp;</td>
            <td width="83"> <input name="key" type="text" class="b-form2" size="9"> 
            </td>
            <td width="97"><img src="ShowKey.php" name="KeyImg" id="KeyImg" align="bottom" onclick="KeyImg.src='ShowKey.php?'+Math.random()" alt="看不清楚,点击刷新"></td>
          </tr>
          <?php
      }
      ?>
         <!-- <tr> 
            <td height="27">窗&nbsp;&nbsp;口:&nbsp;</td>
            <td colspan="2"><input type="radio" name="adminwindow" value="0" checked>
              正常 
              <input type="radio" name="adminwindow" value="1">
              全屏</td>
          </tr>-->
          <tr> 
            <td height="27">&nbsp;</td>
            <td colspan="2" valign="bottom">
                <input name="elvescmskey1" type="hidden" id="elvescmskey1" value="<?php echo $elvescmskey1;?>">
                <input name="elvescmskey2" type="hidden" id="elvescmskey2" value="<?php echo $elvescmskey2;?>">
                <input name="elvescmskey3" type="hidden" id="elvescmskey3" value="<?php echo $elvescmskey3;?>">
                <input name="elvescmskey4" type="hidden" id="elvescmskey4" value="<?php echo $elvescmskey4;?>">
                <input name="elvescmskey5" type="hidden" id="elvescmskey5" value="<?php echo $elvescmskey5;?>">
              <button type="submit">登录</button> <br><br>
            </td>
          </tr>
        </table></td>
    </tr>


  </form>
</table>
<ul class="bg-bubbles">
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>
<script>
if(document.login.equestion.value==0)
{
  showanswer.style.display='none';
}
</script>
</body>
</html>